﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace Coldairarrow.Entity.Goods
{
    /// <summary>
    /// BTB_GoodsType
    /// </summary>
    [Table("BTB_GoodsType")]
    public class BTB_GoodsType
    {

        /// <summary>
        /// 分类id
        /// </summary>
        [Key, Column(Order = 1)]
        public String id { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime? CreateTime { get; set; }

        /// <summary>
        /// 创建者id
        /// </summary>
        public String CreatorId { get; set; }
        /// <summary>
        /// 编辑者
        /// </summary>
        public String Editor { get; set; }
        /// <summary>
        /// 三级分类图片
        /// </summary>
        public String IconImage { get; set; }
        /// <summary>
        /// 编辑时间
        /// </summary>
        public DateTime? EditTime { get; set; }
        /// <summary>
        /// 是否删除
        /// </summary>
        public Boolean? Deleted { get; set; }

        /// <summary>
        /// 分类名称
        /// </summary>
        public String TypeName { get; set; }

        /// <summary>
        /// 父级id
        /// </summary>
        public String Parent { get; set; }

        /// <summary>
        /// 图标
        /// </summary>
        public String Icon { get; set; }
        /// <summary>
        /// 图标
        /// </summary>
        public String RootParent { get; set; }
        /// <summary>
        /// 排序
        /// </summary>
        public int Sort { get; set; }
        public String key { get; set; }
        public String value { get; set; }

        [NotMapped]
        public List<BTB_GoodsType> children { get; set; } = new List<BTB_GoodsType>();

        [NotMapped]
        public IEnumerable<BTB_Goods> BTB_GoodsDTO { get; set; }
    }
}